package com.yellow.orderservice.controller;

import com.yellow.orderservice.entity.Route;
import com.yellow.orderservice.service.RouteService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.*;

/**
 * @author: hy
 * @create: 2024-04-15
 */
@RestController
@CrossOrigin(origins = "*")
@RequestMapping("/route")
public class FeignController {

    @Resource
    private RouteService routeService;

    @GetMapping("/getRoute/{id}")
    public Route findByOrderId(@PathVariable("id") int orderId){
        return routeService.findByOrderId(orderId);
    }
}
